from flask import Flask
from coupon import coupon_bp
from goods import goods_pd
from reg import reg_bp
from user import user_bp

# 初始化


app = Flask(__name__)

# 配置跨域
from flask_cors import CORS

cors = CORS(app)
# 中文格式
app.config['JSON_AS_ASCII'] = False

# 注册蓝图
app.register_blueprint(coupon_bp, url_prefix='/coupon')
app.register_blueprint(goods_pd)
app.register_blueprint(reg_bp)
app.register_blueprint(user_bp, url_prefix='/user')

if __name__ == "__main__":
    app.run(debug=True, host='0.0.0.0', port=5000)
